<script>

    function itemNavLink(choice) {
        console.log(choice)
        switch (choice) {
            case 'date_down': sort = 'date_down'; break;
            case 'price_up': sort = 'price_up'; break;
            case 'price_down': sort = 'price_down'; break;
            default: console.log("what are you fucking doing?")
        }
        console.log(sort)
        loadStart = 0;
        loadedItem = 0;
        console.log('debug1')
        loadCard();
        console.log('debug2')
        loadNav();
    }

    function exeMasonry() {
        if (showOffShelf) {
            $(".offShelf").css("display", '')
        } else {
            $(".offShelf").css("display", 'none')
        }
        var grid = document.querySelector("#cardArea");
        var msnry = new Masonry(grid, {
            // options...
            itemSelector: ".box",
            gutter: 15
        });
    }
</script>